

pkg load symbolic;
syms x;

s = (1+x-1/x^2)^7;

ans = expand(s)

